import {createApp} from 'vue'
import App from './App.vue'
import store from './store'
import router from './router'

// 导入 element-plus
import locale from 'element-plus/es/locale/lang/zh-cn'
import ElementPlus from 'element-plus'
// import 'element-plus/dist/index.css'
import './assets/css/element.scss'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)

// 注册 element-plus 图标
app.config.globalProperties.$icons = []
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.config.globalProperties.$icons.push(key)
    app.component(key, component)
}

app.use(store).use(router).use(ElementPlus, {locale}).mount('#app')
